/**
 * Copyright (c) 2013-2015, Jieven. All rights reserved.
 *
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
 * To use it on other terms please contact us at 1623736450@qq.com
 */
package com.eova.model;

import com.eova.common.base.BaseModel;

public class Content extends BaseModel<Content> {

	private static final long serialVersionUID = 1703948363920508492L;
	
	public static final Content dao = new Content();
	
	/**
	 * 获取菜单关联对象
	 * @param menuCode
	 * @return
	 */
	public Content queryMinOrder(int channelId) {
		return dao.findFirst("SELECT * from eova_content where channelId = ? ORDER BY `order`",channelId);
	}
	
	public Content queryQ(int channelId,int id) {
		return dao.findFirst("SELECT * from eova_content where channelId = ? and id < ? order by id desc",channelId,id);
	}
	
	public Content queryH(int channelId,int id) {
		return dao.findFirst("SELECT * from eova_content where channelId = ? and id > ? order by id asc",channelId,id);
	}
	
}